<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>05.父项属性-align-items</title>

  <style>

  .box{
    width: 1200px;
    height: 200px;
    margin: 0 auto;
    background-color: pink;
    display: flex;
    align-items: center;
  }

  .box1{
    width: 1200px;
    height: 200px;
    margin: 0 auto;
    background-color: pink;
    display: flex;
    justify-content: center;
  }
  
  .box2{
    width: 1200px;
    height: 200px;
    margin: 0 auto;
    background-color: pink;
    display: flex;
    align-items:end;
  }
    
  .box3{
    width: 1200px;
    height: 200px;
    margin: 0 auto;
    background-color: pink;
    display: flex;
    align-items:start;
  }

  .box4{
    width: 1200px;
    height: 200px;
    margin: 0 auto;
    background-color: pink;
    display: flex;
    align-items:stretch;
    /* flex-direction: column; */
  }

  .item {
    width: 100px;
    height: 100px;
    background-color: blueviolet;
    border-radius: 2px;
    margin: 2px;
  }

  .item1 {
    width: 100px;
    background-color: blueviolet;
    border-radius: 2px;
    margin: 2px;
  }

  </style>
</head>
<body>

<h4> 侧轴居中X：justify-content: center </h4>
<div class="box1">
  <div class="item">1</div>
  <div class="item">2</div>
  <div class="item">3</div>
  <div class="item">4</div>
  <div class="item">5</div>
  <div class="item">6</div>
  <div class="item">7</div>
  <div class="item">8</div>
  <div class="item">9</div>
</div>

<h4> 主轴居中Y：align-items: center </h4>
<div class="box">
  <div class="item">1</div>
  <div class="item">2</div>
  <div class="item">3</div>
  <div class="item">4</div>
  <div class="item">5</div>
  <div class="item">6</div>
  <div class="item">7</div>
  <div class="item">8</div>
  <div class="item">9</div>
</div>

<h4> 主轴居中Y：align-items:end </h4>
<div class="box2">
  <div class="item">1</div>
  <div class="item">2</div>
  <div class="item">3</div>
  <div class="item">4</div>
  <div class="item">5</div>
  <div class="item">6</div>
  <div class="item">7</div>
  <div class="item">8</div>
  <div class="item">9</div>
</div>

<h4> 主轴居中Y：align-items:stretch </h4>
<div class="box4">
  <div class="item1">1</div>
  <div class="item1">2</div>
  <div class="item1">3</div>
  <div class="item1">4</div>
  <div class="item1">5</div>
  <div class="item1">6</div>
  <div class="item1">7</div>
  <div class="item1">8</div>
  <div class="item1">9</div>
</div>



<br/>
<br/>
<br/>
</body>
</html>